Skip to main content

Current methods to extract distance and labels from images

Current Methods

  1. Extract every 30th frames from CCTV videos.
  2. Four ways to run Azure OCR and extract information from images
    1. 2022 Azure OCR pipelines (for DNV set A and B)
      1. Submit one full extracted frame to Azure OCR and get a JSON file as an output.
      2. Run CCTV_Images_extract_labels.ipynb to get the distance and any texts from JSON according to regex expression.
      3. Output: a csv file containing observation, labelAbbr, and distance values of extracted frames for each video.
    2. Distance field region (for SD1 and COV)
      1. Submit one full extracted frame to Azure OCR and get a JSON file as an output.
      2. Run CCTV_Images_extract_labels.ipynb to extract distance value from each JSON based on the distance field region of each video type.
      3. The defect label extracted based on the defect field region of each video type and a dataframe containing PACP code description which is obtained from importing list of PACP codes from:
        1. DNV access DBs for images extracted from COV videos.
        2. SD1 access DBs for images extracted from SD1 videos.
      4. Output: a csv file containing observation, labelAbbr, and distance values of extracted frames for each video.
    3. Snip and Stitch methods to extract distance values only
      1. Snip only distance field region from up to 120 images and stitch them together into one image before submit it to Azure OCR.
      2. Output: a csv file containing distance values of extracted frames for each video.
    4. 6 stacked full frames (DNV 1066 WRc videos)
      1. Run Azure OCR on 6 stacked full extracted frames and get 6 JSON files as outputs.
      2. Distance values of the extracted frames will be extracted and saved as csv file for each video.
      3. Run distance values post processing notebook to refine the distance values.
      4. Output: a csv file containing distance values of extracted frames for each video.

Notes

  • As of now, we do not have the full list of WRc codes and their corresponding description.
  • 1 out of 6 DNV-WRc video types according to distance field does not display defect annotation.
  • 2 out of 6 DNV-WRc video types according to distance field display the description of defect instead of the defect code (e.g., Junction instead of JN). It might be challenging to find the matching defect code of this type of defect annotation without having the list of WRc codes used by inspector.